#include <stdio.h>
#include <stdlib.h>

int count;

int tnp1(int n){
	count++;
	if(n==1) return (1);
	n = (n%2) ? tnp1(3*n+1) : tnp1(n/2);
	return(count);
}
int get_max(int i, int j){
	int k, cur, max = 0;
	for(k = i; k <= j; k++){
		count = 0;
		if( (cur = tnp1(k)) > max) max = cur;
	}
	return(max);
}

int main(void){
	int i, j;
	while(scanf("%d %d", &i, &j)==2){
		printf("%d %d ", i, j);
		if(i < j)
			printf("%d\n", get_max(i, j));
		else
			printf("%d\n", get_max(j, i));
	}
	return(0);
}